package com.cscec5b.inspection.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReceiveDataPushDtos {

    public static class Photo {
        public String capture_date; // yyyy-MM-dd HH:mm:ss
        public String capture_part;
        public String data;         // base64 of file bytes
    }

    public static class RecordItem {
        public String  value;
        public Boolean is_passed;
    }


    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    public static class DataItem {
        /**
         * 用于向上游系统传递数据的Data对象，与对接文档一一对应
         */
        public Long    task_id;
        public Integer task_item_id;
        public Integer inspection_data_id;
        public Integer data_type;
        public String  fail_resample;

        public String  collector;
        public String  inspect_part;
        public String  part_type;

        public Integer check_amount;
        public Integer passed_amount;
        public Integer is_passed;
        public String  check_record;

        public List<Photo>      photos;
        public List<RecordItem> records;
        public List<RecordItem> device_records;

        public String  extra_report_number;
        public Integer min_sample;

        // 可扩展：table_ids/material_ids/... 若将来入库了再加
    }

    public static class PushRequest {
        public List<DataItem> data;
    }

    public static class PushResponse {
        public String code;
        public String msg;
        public Object detail;
    }
}
